package com.authority.service;

import java.util.List;
import java.util.Set;

import com.authority.result.UserPrivilegeDTO;

public interface UserPrivilegeService {
	
	/**
	 * 获取菜单权限列表
	 * @param userId
	 * @param sysCode
	 * @return
	 * @throws Exception 
	 */
	List<UserPrivilegeDTO> getUserPrivilegeList(Long userId,String sysCode) throws Exception;
	
	/**
	 * 获取权限URL集合
	 * @param userId
	 * @param sysCode
	 * @return
	 */
	Set<String> getUserPrivilegeUrls(List<UserPrivilegeDTO> privileges)  throws Exception;
	
	/**
	 * 获取所有菜单权限
	 * @return
	 * @throws Exception 
	 */
	List<UserPrivilegeDTO> getAllUserPrivilegeList() throws Exception;
	
	
	/**
	 * 验证功能权限
	 * @param userId   用户id
	 * @param sysCode  系统code
	 * @param menuCode 页面code
	 * @param actionCode 功能code
	 * @return
	 */
	boolean checkActionPrivilege(Long userId,String sysCode,String pageCode,String actionCode);
	
	/**
	 * 验证页面权限
	 * @param userId 用户id
	 * @param sysCode 系统code
	 * @param pageCode 页面code
	 * @return
	 */
	boolean checkPagePrivilege(Long userId,String sysCode,String pageCode);
}
